<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<%
	request.setAttribute("title", "邀请海报");
%>
<%@ include file="/WEB-INF/views/shared/master/weContentHeader.jsp"%>
<style>
	body{
		background-color:#319CFC;
	}
</style>
<%@ include file="/WEB-INF/views/shared/master/weTitle.jsp"%>

	<div >
		<div>
			<img src="<c:url value='/images/we/invitationIndex/shareIndex.jpg' />" style="width:100%;"/>
		</div>
	</div>

</div>


<%@ include file="/WEB-INF/views/shared/scripts/jquery.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/jqweui.jsp"%>
<%@ include file="/WEB-INF/views/shared/scripts/tabmob.jsp"%>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
	var url = $.getVirtualPath() + "/wechat/cust/personCenter/shareSignature";
	var linkHref=location.href.split('#')[0];
	var href=encodeURIComponent(linkHref);
	var resultJson = $.getJsonPost(url, "href=" + href);
	
	var config = {
		debug : false,
		appId : resultJson.jsapiSignature.appId,// 公众号的唯一标识
		timestamp : resultJson.jsapiSignature.timestamp,// 生成签名的时间戳
		nonceStr : resultJson.jsapiSignature.nonceStr,// 生成签名的随机串
		signature : resultJson.jsapiSignature.signature,// 签名
		jsApiList : [ 'onMenuShareAppMessage', 'onMenuShareTimeline' ]
	}
	wx.config(config);
	
	// 微信事件
	wx.ready(function() {
		// 分享朋友
		wx.onMenuShareAppMessage({
			title : '永利共享商城',
			desc : '生活消费一站购，推荐赚钱尽情享',
			link : linkHref,
			imgUrl : 'http://www.putiyoli.net/ares/images/logo.png',
			success : function() {
				console.log(arguments);
			},
			error : function() {
			}
		});
	
		wx.onMenuShareTimeline({
			title : '生活消费一站购，推荐赚钱尽情享',
			link : linkHref,
			imgUrl : 'http://www.putiyoli.net/ares/images/logo.png',
			success : function(res) {
			}
		});
	
		// 微笑错误处理机制
		wx.error(function(res) {
			console.log(res.errMsg);
		});
});
</script>

<%@ include file="/WEB-INF/views/shared/master/weContentFooter.jsp"%>